<include file="../Public/header" />
<script data-main="__PUBLIC__/admin/js/page/admin/global/water" src="__PUBLIC__/admin/js/lib/requirejs/require.js"></script>
</head>

<body>
  <div class="page page-watermark">
    <div class="page-hd">
      <h1>{$Think.lang.attachConfig}</h1>
    </div>

    <div class="navbar">
      <ul class="nav">
        <li><a href="{:URL('admin/Global/attachconfig')}">{$Think.lang.baseConfig}</a>
        </li>
        <li><a href="{:URL('admin/Global/zone')}">{$Think.lang.zoneConfig}</a>
        </li>
        <li class="active"><a href="{:URL('admin/Global/water')}">{$Think.lang.waterConfig}</a>
        </li>
        <li><a href="{:URL('admin/Global/config',array('configname'=>'yun'))}">又拍云配置</a>
        </li>
      </ul>
    </div>

    <div class="form">
      <form method="post" action="{:URL('admin/Global/doSetAttach')}">
        <dl class="kv">
          <dt>
            <label>{$Think.lang.attachWatermarkClosed}：</label>
          </dt>
          <dd id="J_switch">
            <label>
              <input name="attach_watermark_closed" type="radio" value="0" <eq name="attach_watermark_closed" value="0">checked</eq> />{$Think.lang.close}</label>
            <label>
              <input name="attach_watermark_closed" type="radio" value="1" <eq name="attach_watermark_closed" value="1">checked</eq> />{$Think.lang.open}</label>
          </dd>
        </dl>

        <div id="J_settings" <eq name="attach_watermark_closed" value="0">style="display:none"</eq>>
          <dl class="kv">
            <dt>
              <label>{$Think.lang.attachWatermarkPlace}：</label>
            </dt>
            <dd>
              <table class="watermark-bg">
                <tr align="left">
                  <td>
                    <input type="radio" name="attach_watermark_place" value="1" <eq name="attach_watermark_place" value="1">checked</eq> />#1</td>
                  <td>
                    <input type="radio" name="attach_watermark_place" value="2" <eq name="attach_watermark_place" value="2">checked</eq> />#2</td>
                  <td>
                    <input type="radio" name="attach_watermark_place" value="3" <eq name="attach_watermark_place" value="3">checked</eq> />#3</td>
                </tr>
                <tr align="left">
                  <td>
                    <input type="radio" name="attach_watermark_place" value="4" <eq name="attach_watermark_place" value="4">checked</eq> />#4</td>
                  <td>
                    <input type="radio" name="attach_watermark_place" value="5" <eq name="attach_watermark_place" value="5">checked</eq> />#5</td>
                  <td>
                    <input type="radio" name="attach_watermark_place" value="6" <eq name="attach_watermark_place" value="6">checked</eq> />#6</td>
                </tr>
                <tr align="left">
                  <td>
                    <input type="radio" name="attach_watermark_place" value="7" <eq name="attach_watermark_place" value="7">checked</eq> />#7</td>
                  <td>
                    <input type="radio" name="attach_watermark_place" value="8" <eq name="attach_watermark_place" value="8">checked</eq> />#8</td>
                  <td>
                    <input type="radio" name="attach_watermark_place" value="9" <eq name="attach_watermark_place" value="9">checked</eq> />#9</td>
                </tr>
              </table>
              <p class="tip">{$Think.lang.attachWatermarkClosedRemark}</p>
              <!-- 您可以设置自动为用户上传的 JPG/PNG/GIF 图片附件添加水印，请在此选择水印添加的位置(3x3 共 9 个位置可选)。不支持动画 GIF 格式 -->
            </dd>
          </dl>
          <dl class="kv">
            <dt>
              <label>{$Think.lang.attachWatermarkTransparency}：</label>
            </dt>
            <dd>
              <input type="number" min="0" max="100" name="attach_watermark_transparency" class="input-text" value="{$attach_watermark_transparency}" />
            </dd>
          </dl>
          <dl class="kv">
            <dt>
              <label>{$Think.lang.attachWatermarkMinSize}：</label>
            </dt>
            <dd>
              {$Think.lang.width}
              <input name="attach_watermark_minwidth" type="number" min="0" class="input-text" value="{$attach_watermark_minwidth}" /> px
              {$Think.lang.height}
              <input name="attach_watermark_minheight" type="number" min="0" class="input-text" value="{$attach_watermark_minheight}" /> px
              <p class="tip">{$Think.lang.attachWatermarkMinSizeRemark}</p>
            </dd>
          </dl>
          <dl class="kv">
            <dt>
              <label>{$Think.lang.attachWatermarkType}：</label>
            </dt>
            <dd id="J_type">
              <input name="attach_watermark_type" type="radio" value="img" <eq name="attach_watermark_type" value="img">checked</eq> />{$Think.lang.attachWatermarkTypeImg}
              <!-- 图片型 -->
              <input name="attach_watermark_type" type="radio" value="txt" <eq name="attach_watermark_type" value="txt">checked</eq> />{$Think.lang.attachWatermarkTypeTxt}
              <!-- 文字型 -->
            </dd>
          </dl>
          <div id="J_typeImg" <eq name="attach_watermark_type" value="txt">style="display:none"</eq>>
            <dl class="kv">
              <dt>
                <label>{$Think.lang.attachWatermarkUrl}：</label>
              </dt>
              <dd>
                <input class="input-text" type="text" name="attach_watermark_url" value="{$attach_watermark_url}" style="width:300px;" />
              </dd>
            </dl>
          </div>
          <div id="J_typeTxt" <eq name="attach_watermark_type" value="img">style="display:none"</eq>>
            <dl class="kv">
              <!--偶尔需要顶端对齐可以用valign，如果比较多应当加class-->
              <dt>
                <label>{$Think.lang.attachWatermarkTxt}：</label>
                <!-- 文字型水印的内容 -->
              </dt>
              <dd>
                <input type="text" name="attach_watermark_txt" class="input-text" />
                <p class="tip">{$Think.lang.attachWatermarkTxtRemark} {uid} {uname} {space}
                </p>
                <!-- 水印类型为文本水印时，该设置生效。可选变量 {uid} {uname} {space} -->
              </dd>
              <!-- 可以使用替换变量：{1}表示当前日期 {2}表示当前时间, 例如：“上传达室于{1}{2}” -->
            </dl>
            <dl class="kv">
              <dt>
                <label>{$Think.lang.attachWatermarkFonttype}：</label>
              </dt>
              <dd>
                <input type="text" name="attach_watermark_fonttype" class="input-text" value="{$attach_watermark_fonttype}" style="width:300px;" />
              </dd>
            </dl>
            <dl class="kv">
              <dt>
                <label>{$Think.lang.attachWatermarkFontsize}：</label>
              </dt>
              <dd>
                <input type="number" name="attach_watermark_fontsize" class="input-text" value="{$attach_watermark_fontsize}" />
                <br />
                <p class="tip">{$Think.lang.attachWatermarkFontsizeRemark}</p>
              </dd>
            </dl>
          </div>
        </div>

        <div class="actions">
          <input class="btn btn-y" type="submit" value="{$Think.lang.OK}" />
        </div>
      </form>
    </div>

  </div>
</body>

</html>
